﻿@using QqhrCitizen.Models
@{
    ViewBag.Title = "角色修改";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
    User user = ViewBag.User as User;
}


<div>
    <h2 class="head-tietle">@user.Username - 角色修改</h2>
    @using (Html.BeginForm("RoleUpdate", "Admin", FormMethod.Post, new { @style="margin-top:20px;"}))
    {
        @Html.AntiForgerySID()
        <input type="hidden" name="uid" value="@user.ID" />
        <table class="detail-table">
            <tr>
                <td class="row-title">用户名</td>
                <td>
                    @user.Username
                </td>
            </tr>
            <tr>
                <td class="row-title">角色</td>
                <td>
                    <select name="role" class="textbox">
                        <option value="Admin" @(user.Role == Role.Admin ? "selected" : "")>超级管理员</option>
                        <option value="NewsManager" @(user.Role == Role.NewsManager ? "selected" : "")>新闻管理员</option>
                        <option value="EBookManager" @(user.Role == Role.EBookManager ? "selected" : "")>电子书管理员</option>
                        <option value="CourseManager" @(user.Role == Role.CourseManager ? "selected" : "")>课程管理员</option>
                        <option value="LinkManager" @(user.Role == Role.LinkManager ? "selected" : "")>资源连接管理员</option>
                    </select>
                </td>
        </table>
        <p><input type="submit" value="确定" class="button blue" /></p>
    }
</div>

